package cn.tedu.gxtt.user.webapi.controller;

import cn.tedu.gxtt.commons.pojo.user.dto.UserAddNewDTO;
import cn.tedu.gxtt.commons.restful.JsonResult;
import cn.tedu.gxtt.user.service.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/user")
@Api(tags = "用户模块")
public class UserController {
    @Autowired
    private IUserService userService;

    @PostMapping("/add-new")
    @ApiOperation("新增用户")
    public JsonResult newUser(UserAddNewDTO userAddNewDTO){
        userService.addNew(userAddNewDTO);
        return JsonResult.ok("OK");
    }


}
